home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / foxcolor.zip / UTCOLOR.DOC < prev    next >
Text File  |  1991-05-11  |  5KB  |  121 lines

  1. ***------------------------------------------------------***
  2. *** DOCUMENTATION OF THE COLOR-PICKER BY FRAN WILLIAMSON ***
  3. ***------------------------------------------------------***
  4.  
  5. FILES:    UTCOLOR.DOC
  6.         UTCOLOR.PRG
  7.         UTCOLOR.DBF
  8.  
  9. The color picker program will dynamically change colors on the screen during
  10. the FoxPro application and may be used as a selection from a main menu.
  11.  
  12. The programs use the following FoxPro commands:
  13.     SET COLOR OF NORMAL TO ...
  14.     SET COLOR OF MESSAGES TO ...
  15.     SET COLOR OF TITLES TO ...
  16.     SET COLOR OF BOX TO ...
  17.     SET COLOR OF HIGHLIGHT TO ...
  18.     SET COLOR OF INFORMATION TO ...
  19.     SET COLOR OF FIELDS TO ...
  20.  
  21.  
  22. For more information on the following, see TOM RETTIG'S FOXPRO HANDBOOK,
  23. Bantam Books, June 1990, Pages 646, 647, and 158.
  24.  
  25.                SCHEMES*   COLOR PAIR
  26. NORMAL             1          1       text output, disabled menu bars, pads
  27. MESSAGES           2          1       text output, disabled menu bars, pads
  28. TITLES             1,2        4       active object titles
  29. BOX                1,2        3       border
  30. HIGHLIGHT          1,2        6       selected objects, text, menu bars, pads
  31. INFORMATION        1,2        7       hot keys, clock, current BROWSE record
  32. FIELDS             1          2       current field, input, enabled menu bars
  33.                                       and pads
  34.  
  35.  
  36. * 1 = USER WINDOWS
  37.   2 = USER MENUS
  38.   
  39. NOTE:   In order to use the color-picker program, include the following code
  40.         in your application program.
  41.  
  42. *---BEGIN COLOR INFORMATION
  43.     ** The following COLOR variables and coding requires the use of the
  44.     ** UTCOLOR.DBF file and allows the use of the UTCOLOR.PRG color-
  45.     ** picker program.
  46.     
  47.     PUBLIC MBACK, MTEXT, MSAYS, MMENU, MTITL, MBOXS, MHIGH, MHOTK, MGETS,;
  48.         MERRMSG, MWRNMSG, COLRAREA, WINDOWNM, MDELAST
  49.     
  50.     STORE SPACE(10) TO WINDOWNM
  51.     COLRAREA = 25   
  52.     SELECT (COLRAREA)
  53.         USE UTCOLOR                           && This database is a standard
  54.     LOCATE FOR PICKED <> ' '
  55.     IF .NOT. FOUND()
  56.         LOCATE FOR NAME = 'IBM'  /or/  LOCATE FOR NAME = 'MONOCHROME'
  57.         REPLACE PICKED WITH 'X'
  58.     ENDIF
  59.     STORE TRIM(BACK) TO MBACK
  60.     STORE TRIM(TEXT)+'/'+MBACK TO MTEXT
  61.     STORE TRIM(SAYS)+'/'+MBACK TO MSAYS
  62.     STORE TRIM(GETS) TO MGETS
  63.     STORE MGETS TO MDELAST     
  64.     STORE TRIM(MENU) TO MMENU
  65.     STORE TRIM(BOXS) TO MBOXS
  66.     STORE TRIM(TITL) TO MTITL
  67.     STORE TRIM(HIGH) TO MHIGH
  68.     STORE TRIM(HOTK) TO MHOTK
  69.     STORE TRIM(ERRMSG) TO MERRMSG
  70.     STORE TRIM(WRNMSG) TO MWRNMSG
  71.     USE
  72.     SET COLOR OF NORMAL TO &MTEXT        && NORMAL=All SAY commands
  73.         SET COLOR OF MESSAGES TO &MMENU     && MESSAGES=Disabled menu bars
  74.         SET COLOR OF TITLES TO &MTITL       && TITLES=Active object titles
  75.         SET COLOR OF BOX TO &MBOXS          && BOX=Borders (not BOX command)
  76.         SET COLOR OF HIGHLIGHT TO &MHIGH    && HIGHLIGHT=Selected objects
  77.     SET COLOR OF INFORMATION TO &MHOTK  && INFORMATION=Hot keys
  78.         SET COLOR OF FIELDS TO &MGETS       && FIELDS=All GET commands
  79.  
  80.     ** The additional SET commands below are used to change the normal
  81.     ** colors set above.  Be sure to re-SET to statement above when
  82.     ** exiting program.
  83.     ** SET NORMAL TO MSAYS ---------Use this when SAYing data.
  84.         **                              This allows SAYS of data to match
  85.         **                              the GETS except for reverse video.
  86.         ** SET INFORMATION TO MDELAST---Use in BROWSE WINDOWS when deletion
  87.     **                              is allowed in order for the delete
  88.     **                              asterisk to be visible.
  89.     **
  90. *---END COLOR INFORMATION
  91.  
  92. NOTE:   On a browse window, when a record has been marked for deletion, the
  93.         deletion bullet is the same color as the background color of
  94.         INFORMATION.    If INFORMATION background is the same as the NORMAL
  95.         background, the bullet is not visible.  A variable called MDELAST
  96.         (delete asterisk) contains the  color of FIELDS.  At the beginning of
  97.         a browse program include the statement:
  98.  
  99.                 SET COLOR OF INFORMATION TO &MDELAST.
  100.  
  101.         At the end of the browse, re-set INFORMATION, with the following
  102.         statement:
  103.  
  104.                 SET COLOR OF INFORM
  105.  
  106. You may include the Color-Picker option on the menu of your system for the
  107. users to change their color set.  When the Color-Picker option is chosen,
  108. DO UTCOLOR.  UTCOLOR will allow the user to pick a different color set or
  109. add a new color set.  When the user has selected the new color set, UTCOLOR
  110. will change the colors via the SET COLOR OF ... statements.
  111.  
  112. Upon return from UTCOLOR, your application must re-install the menu bar and
  113. pads to show the new colors on the screen.
  114.  
  115. NOTE:   High-intensity colors are not used on backgrounds because highlighted
  116. backgrounds cause blinking on a CGA screen.
  117.  
  118. Hope you like this.  If you have any questions, problems, or comments, please
  119. call Fran Williamson, Jefferson County Public Schools, (303)273-6869 or her
  120. collaborator, Ida Valdez, (303) 273-6868.
  121.